<!--
 * @Author: your name
 * @Date: 2021-09-13 17:42:48
 * @LastEditTime: 2021-09-14 15:30:31
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /bigdata-manage-ui/Users/xzx/Desktop/A-xichen/vue-admin-box/src/components/transaction/tradingStrategy.vue
-->
<template>
  <div id="tradingStrateyDetail">
    <el-dialog
      ref="dialog"
      v-model="tradingLayerDetail.show"
      :title="tradingLayerDetail.title"
      :close-on-click-modal="false"
      width="70%"
      center
    >
      <div style="max-height: 65vh; overflow:auto;">
        <el-form ref="form" :model="dataDetail" label-width="80px">
          <!-- 开仓条件 -->
          <el-divider content-position="left">开仓条件</el-divider>
          <el-form-item label="开仓价格:">
            <el-input v-model="dataDetail.price">
              <template #append>元</template>
            </el-input>
          </el-form-item>
          <el-form-item label="买入总额:">
            <el-input v-model="dataDetail.price" style="width:50%">
              <template #append>元</template>
            </el-input>
            <el-input v-model="dataDetail.price" style="width:48%; margin-left:2%;">
              <template #append>股</template>
            </el-input>
          </el-form-item>
          <!-- 地雷交易条件 -->
          <el-divider content-position="left">地雷交易条件</el-divider>
          <el-form-item label="买入条件:" class="item-space">
            <el-input v-model="dataDetail.price" style="width:30%;">
              <template #prepend>价格下跌</template>
              <template #append>%</template>
            </el-input>
            <el-input v-model="dataDetail.price" style="width:35%;">
              <template #prepend>买入</template>
              <template #append>元</template>
            </el-input>
            <el-input v-model="dataDetail.price" style="width:31%;">
              <template #append>股</template>
            </el-input>
          </el-form-item>
          <el-form-item label="买入次数:">
            <el-input v-model="dataDetail.price"></el-input>
          </el-form-item>
          <el-form-item label="卖出条件:" class="item-space">
            <el-input v-model="dataDetail.price" style="width:30%;">
              <template #prepend>价格上涨</template>
              <template #append>%</template>
            </el-input>
            <el-input v-model="dataDetail.price" style="width:35%;">
              <template #prepend>卖出</template>
              <template #append>元</template>
            </el-input>
            <el-input v-model="dataDetail.price" style="width:31%;">
              <template #append>股</template>
            </el-input>
          </el-form-item>
          <el-form-item label="卖出次数:">
            <el-input v-model="dataDetail.price"></el-input>
          </el-form-item>
          <!-- 天网交易条件 -->
          <el-divider content-position="left">天网交易条件</el-divider>
          <el-form-item label="卖出条件:" class="item-space">
            <el-input v-model="dataDetail.price" style="width:30%;">
              <template #prepend>价格上涨</template>
              <template #append>%</template>
            </el-input>
            <el-input v-model="dataDetail.price" style="width:35%;">
              <template #prepend>卖出</template>
              <template #append>元</template>
            </el-input>
            <el-input v-model="dataDetail.price" style="width:31%;">
              <template #append>股</template>
            </el-input>
          </el-form-item>
          <el-form-item label="卖出次数:">
            <el-input v-model="dataDetail.price"></el-input>
          </el-form-item>
        </el-form>
      </div>
      <template #footer>
        <span class="dialog-footer">
          <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
          <el-button @click="dialogVisible = false">重 置</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive, watch } from "vue";

export default defineComponent({
  components: {},
  props: {
    tradingLayerDetail: {
      type: Object,
      default: () => {
        return {
          show: false,
          title: "策略详情"
        };
      }
    },
    dataDetail: {
      type: Object,
      default: () => {
        return {
          price: 10
        };
      }
    }
  },
  setup(props, ctx) {
    function confirm() {
      ctx.emit("confirm");
    }
    return {};
  }
});
</script>

<style lang="scss">
#tradingStrateyDetail {
  .el-dialog--center .el-dialog__body {
    padding: 0 30px;
  }
  .item-space .el-form-item__content {
    display: flex;
    justify-content: space-between !important;
  }
  .el-dialog--center .el-dialog__footer {
      text-align: right;
  }
  .el-input-group__append, .el-input-group__prepend {
      padding: 0 5px;
  }
}
</style>